const pageHeight = this._pageHeight;
const pageSizeChanged = this._pageSizeChanged;
const lastRowAlign = this.lastRowAlign;
+ const shouldEaseItems = this._shouldEaseItems;
this._pages.forEach((page, pageIndex) => {
if (isRtl && orientation === Clutter.Orientation.HORIZONTAL)
Math.max(childSize, naturalWidth),
Math.max(childSize, naturalHeight));
- // Only ease icons when the page size didn't change
- if (pageSizeChanged)
+ if (!shouldEaseItems || pageSizeChanged)
item.allocate(childBox);
else if (animateIconPosition(item, childBox, nChangedIcons))
nChangedIcons++;
});
this._pageSizeChanged = false;
+ this._shouldEaseItems = false;
this._runPostAllocation();
}
if (!this._container)
return;
+ this._shouldEaseItems = true;
+
this._container.add_child(item);
this._addItemToPage(item, page, index);
}
if (!this._items.has(item))
throw new Error(`Item ${item} is not part of the IconGridLayout`);
+ this._shouldEaseItems = true;
+
this._removeItemData(item);
this._addItemToPage(item, newPage, newPosition);
}
if (!this._container)
return;
+ this._shouldEaseItems = true;
+
this._container.remove_child(item);
this._removeItemData(item);
}